﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="CardPage">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Scripts">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="ClientScript">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="FunctionName" type="xs:string" use="required" />
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Fields">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Field">
                <xs:complexType>
                  <xs:sequence minOccurs="0">
                    <xs:element minOccurs="0" name="Scripts">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="ClientScript">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute name="Event" type="xs:string" use="required" />
                                  <xs:attribute name="FunctionCall" type="xs:string" use="required" />
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" name="Languages">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="Label">
                            <xs:complexType>
                              <xs:attribute name="Name" type="xs:string" use="required" />
                              <xs:attribute name="Value" type="xs:string" use="required" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="Name" type="xs:string" use="required" />
                  <xs:attribute name="DataType" type="xs:string" use="required" />
                  <xs:attribute name="Label" type="xs:string" use="required" />
                  <xs:attribute name="Editable" type="xs:boolean" use="required" />
                  <xs:attribute name="IsRequired" type="xs:boolean" use="required" />
                  <xs:attribute name="Value" type="xs:string" use="required" />
                  <xs:attribute name="Options" type="xs:string" use="optional" />
                  <xs:attribute name="TableLink" type="xs:string" use="optional" />
                  <xs:attribute name="DisplayField" type="xs:string" use="optional" />
                  <xs:attribute name="StoreField" type="xs:string" use="optional" />
                  <xs:attribute name="Option" type="xs:string" use="optional" />
                </xs:complexType>
              </xs:element>
              <xs:element name="GridForm">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="Field">
                      <xs:complexType>
                        <xs:attribute name="Name" type="xs:string" use="required" />
                        <xs:attribute name="DataType" type="xs:string" use="required" />
                        <xs:attribute name="Label" type="xs:string" use="required" />
                        <xs:attribute name="Editable" type="xs:boolean" use="required" />
                        <xs:attribute name="IsRequired" type="xs:boolean" use="required" />
                        <xs:attribute name="Value" type="xs:string" use="required" />
                        <xs:attribute name="Options" type="xs:string" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="LinkTable" type="xs:string" use="required" />
                  <xs:attribute name="LinkKey" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>